<?php
	class PDOClass extends PDO{
		private $host="localhost";
		private $dbname = 'wof';
		private $user = 'root';
		private $pass = '';
		public  $db;
		
		public function __construct(){
			# connect to the database  
		    try {  
		    
		      $this->db = new PDO("mysql:host=$this->host;dbname=$this->dbname", $this->user, $this->pass,array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));  
		      $this->db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );  
		    }  
		    catch(PDOException $e) {  
		        file_put_contents('PDOErrors.txt', $e->getMessage(), FILE_APPEND);  
		    }
		}
	}
?>